package com.radar.common;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import org.meteoinfo.projection.KnownCoordinateSystems;
import org.meteoinfo.projection.info.ProjectionInfo;

import java.util.Date;

/**
 * @author fy-wbj
 * @description gis常量
 * @date 2019/7/29
 */
public class GisConstants {

    private GisConstants(){

    }


    /**
     * 缺测值
     */
    public static final int UNDEF = -999;

    public static final int MASK = -888;

    public static final String UNDEF_STR = "-999";

    private static final Date FIRST_DATE = DateUtil.parse("1970-01-01 00:00:00", DateConstants.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS);

    public static Date getFirstDate() {
        return FIRST_DATE;
    }

    public static final String PREFIXHEX = "0x";

    public static final ProjectionInfo lonlat = ProjectionInfo.factory(KnownCoordinateSystems.geographic.world.WGS1984.toProj4String());

    public static final ProjectionInfo merc = ProjectionInfo.factory("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs");

    public static final ProjectionInfo lcc = ProjectionInfo.factory("+proj=lcc +lat_1=60.0 +lat_2=30.0 +lat_0=40.558403 +lon_0=128.0 ");

    public static final ProjectionInfo lcc1 = ProjectionInfo.factory("+proj=lcc +lat_1=60.0 +lat_2=30.0 +lat_0=12.972 +lon_0=100.0 ");

    public static final ProjectionInfo lcc2 = ProjectionInfo.factory("+proj=lcc +lat_1=60.0 +lat_2=30.0 +lat_0=20.463 +lon_0=110.0 ");

    public static final String EPSG_4326 = "EPSG:4326";

    public static final String EPSG_3857 = "EPSG:3857";

    public static final boolean TEST = FileUtil.exist("/Users/xx/data/Fonts.tar.gz") || FileUtil.exist("F:\\data\\geotools-21.2\\ant-1.8.1.jar");
}
